def black_wrapper(fun):
    def run(*args, **kwargs):
        basepage = args[0]
        try:
            fun(*args, **kwargs)
        #捕获元素没找到异常
        except Exception as e:
            for black in basepage._black_list:
                elements = basepage.finds(*black)
                #黑名单被找到
                if len(elements) > 0:
                    #对黑名单进行点击，可以自由扩展
                    for ele in elements:
                        ele.click()
                    return fun(*args, **kwargs)
            raise e
    return run